package com.fh.modules.oms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fh.common.query.QueryRuleEnum;
import com.fh.common.query.annotation.QueryWrapperRule;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 微信订单表
 * @author： code generator
 * @date：   2019-10-07
 * @version： V1.0
 */
@Data
@TableName("oms_order_wechat")
public class OmsOrderWechat implements Serializable {

	private static final long serialVersionUID = 3877521417419929071L;

	/**订单id*/
	@TableId(type = IdType.AUTO)
	private Integer id;
	/**优惠券ID*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer couponId;
	/**订单编号*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String orderSn;
	/**member用户帐号*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer memberId;
	/**订单商品种类数*/
	private Integer itemCount;
	/**订单总金额(商品总价+运费)*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal totalPrice;
	/**应付金额（应付金额（实际支付金额=订单总金额-优惠券抵扣金额-积分抵扣金额-促销优化金额-管理员调整折扣金额））*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal payPrice;
	/**促销优化金额（促销价、满减、阶梯价）*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal promotionPrice=new BigDecimal("0");
	/**可以获得的积分*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer integration=0;
	/**下单时使用的积分*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer useIntegration=0;
	/**积分抵扣金额*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal integrationPrice=new BigDecimal("0");
	/**优惠券抵扣金额*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal couponPrice=new BigDecimal("0");
	/**管理员后台调整订单使用的折扣金额*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal discountPrice=new BigDecimal("0");
	/**订单状态：0->已取消；1->待付款；2->付款确认中；3->待发货；4->已发货；5->已完成；6->已关闭；7->退货中；8->已退货*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer status=1;
	/**订单类型：0->正常订单；1->秒杀订单*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer orderType=0;
	/**运费金额*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private BigDecimal freightPrice=new BigDecimal("0");
	/**物流公司(配送方式)*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String deliveryCompany;
	/**物流单号*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String deliverySn;
	/**收货人姓名*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverName;
	/**收货人电话*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverPhone;
	/**省份/直辖市*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverProvince;
	/**城市*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverCity;
	/**区*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverRegion;
	/**详细地址*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String receiverDetailAddress;
	/**订单备注*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String note;
	/**确认收货状态：0->未确认；1->已确认*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer confirmStatus=0;
	/**提交时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**支付时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date paymentTime;
	/**发货时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date deliveryTime;
	/**确认收货时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date receiveTime;
	/**评价时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date commentTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date modifyTime;
	/**删除状态：0->未删除；1->已删除*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private Integer delFlag=0;
	/**微信支付订单号*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String wechatPrepayId;
	/**微信支付回调，微信订单号*/
	@QueryWrapperRule(rule=QueryRuleEnum.EQ)
	private String transactionId;
}
